package model;
import db.DB;

import java.io.Serializable;
import java.sql.Date;
//采购订单
public class purchase_list implements Serializable{
    private int Purchase_List_id;
    private Date Purchase_List_date;
    private double Purchase_List_amount;
    private byte state;
    private int Supplier_id;
    private int User_id;
    private String remarks;

    public int getPurchase_List_id() {return Purchase_List_id;}
    public Date getPurchase_List_date() {return Purchase_List_date;}
    public double getPurchase_List_amount() {return Purchase_List_amount;}
    public byte getstate() {return state;}
    public int getSupplier_id() {return Supplier_id;}
    public int getUser_id() {return User_id;}
    public String getremarks() {return remarks;}

    public String getstate_show(){
        if (state==1)return "是";
        else return "否";
    }
    public String showdetail1(){
        return "订单编号："+Purchase_List_id+" &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "日期："+Purchase_List_date+" &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "总价："+Purchase_List_amount+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "是否结账："+getstate_show();
    }
    public String showdetail2(){
        return "供应商："+new DB().findsupplyname(Supplier_id)+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "操作员编号："+User_id+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "备注："+remarks;
    }
    public String getsupply_show(){
        return new DB().findsupplyname(Supplier_id);
    }


    public void setPurchase_List_id(int purchase_List_id) {Purchase_List_id = purchase_List_id;}
    public void setPurchase_List_date(Date purchase_List_date) {Purchase_List_date = purchase_List_date;}
    public void setPurchase_List_amount(double purchase_List_amount) {Purchase_List_amount = purchase_List_amount;}
    public void setstate(byte state) {this.state = state;}
    public void setSupplier_id(int supplier_id) {Supplier_id = supplier_id;}
    public void setUser_id(int user_id) {User_id = user_id;}
    public void setremarks(String remarks) {this.remarks = remarks;}

}
